package top.cdmrx.demo.edu.controller;

import org.springframework.web.bind.annotation.*;
import top.cdmrx.common.R;

/**
 * Created by Mr.陈 time on 2021/9/11 | 11:08
 **/
@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin        //解决跨域问题
public class EduLoginController {

    //login
    @PostMapping("login")
    public R login(){

        return R.success().data("token","admin");
    }


    //info
    @GetMapping("info")
    public R info(){

        return R.success().data("roles","[admin]").data("name","admin").data("avatar",
                "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }

}
